using System.Collections.Generic;
using System.Runtime.InteropServices;

namespace Chaotic.DataBase.DataAccess
{
	[StructLayout(LayoutKind.Sequential, Size = 1)]
	public struct PersistenceProperty
	{
		private static DatabaseType _mDatabaseType;

		private static int _mOtherConnectionStringIndex = -1;

		private static List<string> _mOtherConnectionStringList = new();

		private static List<DatabaseType> _mOtherDatabaseType = new();

		public static string ConnectionString { get; set; }

		public static DatabaseType DatabaseType
		{
			get => _mDatabaseType;
            set => _mDatabaseType = value;
        }

		public static int OtherConnectionStringIndex
		{
			get => _mOtherConnectionStringIndex;
            set => _mOtherConnectionStringIndex = value;
        }

		public static List<string> OtherConnectionStringList
		{
			get => _mOtherConnectionStringList;
            set => _mOtherConnectionStringList = value;
        }

		public static List<DatabaseType> OtherDatabaseType
		{
			get => _mOtherDatabaseType;
            set => _mOtherDatabaseType = value;
        }

		public static bool IsLogToDb { get; set; }

		public static string LogConnectionString { get; set; }

		internal static Dictionary<DatabaseType, IDbTypeEnum> GetDbTypeEunm { get; set; } = new Dictionary<DatabaseType, IDbTypeEnum>();
	}
}